package de.androidschoice.androids.choice;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
    
    public void storya1(View view){
    	((ChoiceApplication)this.getApplication()).saveChosenAndroid(1);
    	Intent intent = new Intent(this, TextSelectionActivity.class);
    	this.startActivity(intent);
    	}
    
    public void storya2(View view){
    	((ChoiceApplication)this.getApplication()).saveChosenAndroid(2);
    	Intent intent = new Intent(this, TextSelectionActivity.class);
    	this.startActivity(intent);
    	}
    
    public void storya3(View view){
    	((ChoiceApplication)this.getApplication()).saveChosenAndroid(3);
    	Intent intent = new Intent(this, TextSelectionActivity.class);
    	this.startActivity(intent);
    	}
    
    public void storya4(View view){
    	((ChoiceApplication)this.getApplication()).saveChosenAndroid(4);
    	Intent intent = new Intent(this, TextSelectionActivity.class);
    	this.startActivity(intent);
    	}
    
}
